home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
SHARED.DIR
/
03085_Script_SOUND HANDLERS
< prev
next >
Wrap
Text File
|
1996-04-01
|
2KB
|
69 lines
-- -----------------------------------------------------------
-- Handler stopVoice stops the sound in channel 2 and fades the
-- sound in channel 1.
on stopVoice
sound stop 2
put the volume of sound 1 into startVol
if (StartVol > 0) then
put the ticks into startTicks
repeat with N = 0 to startVol
set the volume of sound 1 to startVol - N
updateStage
-- In case of problem, get out of here after 90 ticks:
if (the ticks > startTicks + 90) then exit repeat
end repeat
end if
sound stop 1
set the volume of sound 1 to 255
end
-- -----------------------------------------------------------
-- Handler waitVoice plays the sound in channel 1 allowing it
-- to be interruptable by a mouseclick.
on WaitVoice
repeat while (not (the mouseDown)) and (soundBusy(1))
updateStage
end repeat
-- puppetSound 0
end
-- -----------------------------------------------------------
-- Handler playLoadingSound plays a loading sound.
on playLoadingSound
playSpecificLoadingSound ""
end
on stopPlayingLoadingSound
puppetSound 0
end
-- -----------------------------------------------------------
-- Handler playSpecificLoadingSound plays the given loading sound.
-- If the loading sound is empty, it plays a random loading sound.
on playSpecificLoadingSound whichSound
exit -- Removed as per Harry's instructions March 18, 1996
stopVoice
if (whichSound = empty) or voidP(whichSound) then put "MISC" & string(random(4)) into whichSound
put "LS_" & (char 1 to 5 of whichSound) & ".AIF" into TransSound
puppetSound TransSound
updateStage
end
-- -----------------------------------------------------------
-- Handler waitSoundInChannel plays an interruptable sound in
-- the given sound channel.
on waitSoundInChannel whichChannel
repeat while (not (the mouseDown)) and (soundBusy(whichChannel))
updateStage
end repeat
end